Fix to allow a new line in the Option definition.#22
Closed
rhorenov wants to merge 1 commit intodocopt:masterfrom
Closed
Fix to allow a new line in the Option definition.#22rhorenov wants to merge 1 commit intodocopt:masterfrom
rhorenov wants to merge 1 commit intodocopt:masterfrom
Conversation
The problem manifests on platforms where '$' does not match new line. According to: http://cplusplus.github.io/LWG/lwg-active.html#2343 some RegEx implementations e.g. GCC have multiline property turned off so '$' does not match a new line character and the Option parser fails to recognise an option's parameter if it is present. Example ======= Usage: my_app [--so-long-option-that-the-description-is-on-a-new-line <param>] Options: --so-long-option-that-the-description-is-on-a-new-line <param> Something very important [default: 43] modified: docopt.cpp
Member
|
Sorry for the delay ... I've been trying to get some of these taken care of, and would be willing to merge this. However, it looks like other pull requests have now created a merge conflict. Do you mind rebasing this and leaving a comment? Then we can have travis verify that things still look ok. |
|
Is there an update on the status of this PR? This is a very helpful feature. |
Member
|
I just need a rebase of it to resolve the merge conflict. |
|
Is this PR a duplicate of PR #55? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi,
thanks for the good work on docopt.cpp.
I've submitted few pull requests to address some problems I've found while using docopt.cpp in our application.
This is again a simillar problem to pull request #23. Perhaps I should have squashed them together...
The problem manifests on platforms where '$' does not match new line e.g. Linux.
According to:
http://cplusplus.github.io/LWG/lwg-active.html#2343
some RegEx implementations e.g. GCC have multiline property turned off so '$' does not match a new line character and the Option parser fails to recognise an option's parameter if it is present.
All test are passing on gcc 5.1 and msvc2015.
Regards,
Roman
Failing example:
modified: docopt.cpp